package com.jt.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class ImageVo {

    private Integer error;//0表示成功，1表示上传失败
    private String url;//图片的网络地址
    private Integer width;
    private Integer height;

    public static ImageVo fail(){
        return new ImageVo(1,null,null,null);
    }
    public static ImageVo success(String url,Integer width,Integer height){
        return new ImageVo(0,url,width,height);
    }
}
